package com.ybxx.dashboard.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ybxx.base.model.Residents;
import com.ybxx.base.model.Room;
import com.ybxx.core.model.BaseModel;

@Entity
@Table(name="tbl_dashboard_wartermeter_room")
public class WatermeterRoom extends BaseModel {
	@Id
	private String wmid;
	@ManyToOne(targetEntity=Watermeter.class,fetch=FetchType.LAZY)
	@JoinColumn(name="wmcode",referencedColumnName="wmcode") 
	private Watermeter watermeter;
	@ManyToOne(targetEntity=Room.class,fetch=FetchType.LAZY)
	@JoinColumn(name="rid",referencedColumnName="rid") 
	private Room room;
	@ManyToOne(targetEntity=Residents.class,fetch=FetchType.LAZY)
	@JoinColumn(name="rcode",referencedColumnName="rcode") 
	private Residents residents;
	private String pname;
	private String pnum;
	private String compare;
	private String content;
	private String roomcode;
	public String getWmid() {
		return wmid;
	}
	public void setWmid(String wmid) {
		this.wmid = wmid;
	}
	public Watermeter getWatermeter() {
		return watermeter;
	}
	public void setWatermeter(Watermeter watermeter) {
		this.watermeter = watermeter;
	}
	public Room getRoom() {
		return room;
	}
	public void setRoom(Room room) {
		this.room = room;
	}
	public Residents getResidents() {
		return residents;
	}
	public void setResidents(Residents residents) {
		this.residents = residents;
	}
	public String getPname() {
		return pname;
	}
	public void setPname(String pname) {
		this.pname = pname;
	}
	public String getPnum() {
		return pnum;
	}
	public void setPnum(String pnum) {
		this.pnum = pnum;
	}
	public String getCompare() {
		return compare;
	}
	public void setCompare(String compare) {
		this.compare = compare;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getRoomcode() {
		return roomcode;
	}
	public void setRoomcode(String roomcode) {
		this.roomcode = roomcode;
	}
	
	
}
